package interfaceOrnegi;

import java.sql.Connection;
import java.sql.PreparedStatement;


public class JdbcDAO implements DAO {

	@Override
	public void insert(Muesteri muesteri) {

		Connection con = null;
		PreparedStatement pstmt = null;

		con = getConnection();
		try {
			pstmt = con
					.prepareStatement("insert into muesteri(isim,soyad,adres) values(?,?,?)");
			pstmt.setString(1, muesteri.getIsim());
			pstmt.setString(2, muesteri.getSoyad());
			pstmt.setString(3, muesteri.getAdres());
			pstmt.executeUpdate();

		} catch (Exception e) {
			
			e.printStackTrace();
		}
	}

	@Override
	public void update(Muesteri muesteri) {

	}

	@Override
	public void delete(Muesteri muesteri) {

	}

	public Connection getConnection() {
        
		///con="jdbc:mysql://localhost:3306/dbgod", "root", "root";
		
		return null;
		
	}
}
